package com.mars.tukuan.dto;

import com.mars.base.common.utils.date.DateUtil;
import com.mars.tukuan.entity.CreditMgr;

public class CreditMgrVo extends CreditMgr {

	private static final long serialVersionUID = 1L;

	// 延期天数（正负数，-当前剩余天数，+当前剩余天数）
	private Integer delay;

	// 剩余天数(当前日期-到监控周期的天数)
	private Integer surplus;

	// 状态（true：已完成，false：未完成）
	private Boolean status;

	public Integer getDelay() {
		return delay;
	}

	public void setDelay(Integer delay) {
		this.delay = delay;
	}

	public Integer getSurplus() {
		// 计算剩余天数
		int betweenTwoDates = DateUtil.betweenTwoDates(this.getMonitorDate(), DateUtil.parseDate(DateUtil.getDate(), DateUtil.FORMAT_DATE));
		if (betweenTwoDates >= 0) {
			this.surplus = betweenTwoDates;
		} else {
			this.surplus = 0;
		}
		return surplus;
	}

	public void setSurplus(Integer surplus) {
		this.surplus = surplus;
	}

	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

}
